import './utils/index.js'
import './utils/http.js'
import './utils/dataFormat.js'
// app.js
App({
  globalData: {},
  onLaunch() {
    // 读取本地存储的 token 数据
    this.getToken()
  },
  getToken() {
    // 将 token 数据记到应用实例中
    this.token = wx.getStorageSync('token')
    this.refreshToken = wx.getStorageSync('refreshToken')
  },
  setToken(key, value) {
    // 挂载token
    this[key] = value
    // 存储token
    wx.setStorageSync(key, value)
    console.log(this)
  }
})
